<html lang="en" xmlns:th="http://www.thymeleaf.org" th:fragment="layout(title, css, main, js)"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity6">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:text="${title}">简洁侧边栏布局</title>
</head>
<th:block th:replace="${css}"/>
<link rel="stylesheet" th:href="@{/css/sidebar.css}">
<link rel="stylesheet" th:href="@{/css/classify/ALL.css}" id="css">
<body>
<!-- 侧边栏 -->
<div class="sidebar" id="sidebar">
    <div class="sidebar-header">
        <h2>管理面板</h2>
        <p>欢迎回来, 管理员</p>
    </div>
    <div class="sidebar-menu">
        <a th:href="@{'/'}" th:class="|menu-item ${#strings.equals(requestURI, '/') ? 'active' : ''}|"
           data-content="dashboard">
            <span>仪表盘</span>
        </a>
        <a th:href="@{'/user'}" th:class="|menu-item ${#strings.startsWith(requestURI, '/user') ? 'active' : ''}|"
           data-content="user_information">
            <span>客户资料</span>
        </a>
        <a th:href="@{'/products'}"
           th:class="|menu-item ${#strings.startsWith(requestURI, '/products') ? 'active' : ''}|"
           data-content="messages">
            <span>产品资料</span>
        </a>
        <a th:href="@{'/sale'}"
           th:class="|menu-item ${#strings.startsWith(requestURI, '/sale') ? 'active' : ''}|"
           data-content="messages">
            <span>报表</span>
        </a>
    </div>
</div>

<th:block th:replace="${main}"/>

<th:block th:replace="${js}"/>
</body>
</html>